home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: [Q] Any utility to attack misuse of comment /* */
- Date: 17 Apr 1996 11:58:29 -0700
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4l3f0lINNdu7@keats.ugrad.cs.ubc.ca>
- References: <4l32et$bhm@sun.rhbnc.ac.uk>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4l32et$bhm@sun.rhbnc.ac.uk>, Jim Hu <jim@gl.rhbnc.ac.uk> wrote:
- >Ho, there,
- >
- > I found out gcc and C provided by SGI for irix fail
- >to find out bug like this
- >
- >/*
- > statements;
- >
- >/*
- > comments
- >*/
- >
- > other_statements;
- >
- >
- > As you can, */ is missed out in the first case, the compilers
- >failed to find out this obvious error. Is there any free utility to
- >attack this bug. This bug can easily appear when you comment/uncomment
- >frequently.
-
- Really? Even the lexical analyzer I wrote in an undergraduate compiler
- construction course checked for the start of a comment within a comment, and
- produced a warning diagnostic. This is not a hard thing, and I'm sure GCC has
- it.
-
- Do you have -Wall turned on?
-
- latte:~>gcc -Wall test.c
- test.c:3: warning: `/*' within comment
-
- There ya go.
-
- > Please help via email or send me a copy if reply here.
-
- Ah yes. Plenty of time to chase down utilities for simple lexical errors that
- any proficient text mangler can detect with vi, but not enough time to check
- for replies in a newsgroup or RTFM on GCC.
- --
- I'm not really a jerk, but I play one on Usenet.
-